/** 默认 pageSize */
export const DEFAULT_PAGE_SIZE = 20

/** 默认 pageSizeOptions */
export const PAGE_SIZE_OPTIONS = [20, 50, 100]

/**
 * 生成默认的分页配置
 */
export const getDefaultPaginationProps = (total: number) => {
  return {
    size: 'small' as const,
    total,
    showTotal: (total: number) => `共 ${total} 条`,
    pageSizeOptions: PAGE_SIZE_OPTIONS,
    showSizeChanger: { getPopupContainer: () => document.body },
  }
}
